<?php

namespace Addons\shop\Controller;
use Addons\Shop\Controller\BaseController;
/*
 * 商铺功能  首页
 * 
 */
class ShopeController extends BaseController{
   
	function _initialize() {
		parent::_initialize();
		//计算购物车商品数量
		$shopcart_count = D('Addons://Shop/Cart')->getCount();
		$this->assign('shopcart_count',$shopcart_count);
		//获取当前选择的方法 以高亮底部导航
		$footer_current = strtolower(_ACTION);
		$this->assign('footer_current',$footer_current);
		//echo $footer_current;exit;
		//获取是否含有订单
		$has_un_pay = D('Addons://Shop/Order')->hasUnPay();
		$this->assign('has_un_pay',$has_un_pay);
		//获取配置信息
		$shop_config = get_addon_config('Shop');
		$this->assign('shop_config',$shop_config);
	}
    //显示首页
    public function index(){
        
		$this->display();

    }
}